<script type="text/javascript">
$(function() {
  $(".column").sortable({connectWith:".column"});
  $(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all").find(".portlet-header").addClass("ui-corner-all").prepend('<span class="ui-icon ui-icon-plusthick"></span>').end().find(".portlet-content");
  $(".portlet-header .ui-icon").click(function() {
    $(this).toggleClass("ui-icon-minusthick");
    $(this).parents(".portlet:first").find(".portlet-content").toggle()
  });
  $(".column").disableSelection();
  $(".portlet-header").removeClass("ui-corner-all").addClass("ui-corner-top")
});
if (<?php echo $this->refresh; ?> == true)
  $("#buttonRefresh").css('display', 'block')
 </script>
<p class="text_titre">
    <?php echo $this->content; ?>
</p>
<div id="buttonRefresh" style="margin-top: -40px; float: right; display: none;">
    <button type="button" class="boutonUtilisateur" onclick="refreshDashboard()"><?php echo $this->refresh_title; ?></button>
</div>
<div class="demo">
    <br/>
    <div class="column">
        <?php
        //print_r($this->column1);
        if (isset($this->column1))
        {
            foreach ($this->column1 as $key => $value)
            {
        ?>
                <div class='portlet'>
                    <div class='portlet-header'><?php echo $value->getModuleDashboard(); ?></div>
                    <div class='portlet-content'><?php echo $this->action("showmodule", "dashboard", null, array("module" => $value->getUrl())); ?></div>
                </div>
        <?php
            }
        }
        ?>
    </div>

    <div class="column">
        <?php
        if (isset($this->column2))
        {
            foreach ($this->column2 as $key => $value)
            {
        ?>
                <div class='portlet'>
                    <div class='portlet-header'><?php echo $value->getModuleDashboard(); ?></div>
                    <div class='portlet-content'><?php echo $this->action("showmodule", "dashboard", null, array("module" => $value->getUrl())); ?></div>
                </div>
        <?php
            }
        }
        ?>
    </div>

    <div class="column">
        <?php
        if (isset($this->column3))
        {
            foreach ($this->column3 as $key => $value)
            {
        ?>
                <div class='portlet'>
                    <div class='portlet-header'><?php echo $value->getModuleDashboard(); ?></div>
                    <div class='portlet-content'><?php echo $this->action("showmodule", "dashboard", null, array("module" => $value->getUrl())); ?></div>
                </div>
        <?php
            }
        }
        ?>
    </div>

    <div class="column">
        <?php
        if (isset($this->column4))
        {
            foreach ($this->column4 as $key => $value)
            {
        ?>
                <div class='portlet'>
                    <div class='portlet-header'><?php echo $value->getModuleDashboard(); ?></div>
                    <div class='portlet-content'><?php echo $this->action("showmodule", "dashboard", null, array("module" => $value->getUrl())); ?></div>
                </div>
        <?php
            }
        }
        ?>
    </div>

</div>
<div class="demo-description">
</div>

